<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>西城区处级干部培训学时管理系统</title>
<link type="text/css" href="<%=basePath%>skin/loginStyle/lib/base.css" rel="stylesheet" />
<link type="text/css" href="<%=basePath%>skin/loginStyle/lib/page.css" rel="stylesheet" />
<script language="JavaScript" type="text/javascript" src="<%=basePath%>/common/project/js/html5shiv.min.js"></script>
<script language="JavaScript" type="text/javascript" src="<%=basePath%>/common/project/js/jquery-1.8.3.min.js"></script>
<script language="JavaScript" type="text/javascript" src="<%=basePath%>/common/project/js/base64.js"></script>
<object classid="clsid:ADB69744-9062-43C4-82EE-E59A7C692C42" id="ePass"
	name="ePass"
	codebase="<%=basePath%>epassnd/Web_Install/files/install.cab#Version=1,0,0,0"
	style="LEFT: 0px; TOP: 0px" width="0" height="0"></object>
<script>
    function onOptionChange(value){
      if(value != ""){
        window.open(value,'_blank');
        document.all.select.value="";
      }
    }
    
    /*
    $(window.document).keydown(function(event){
         //alert(event.keyCode);
    	 if(event.keyCode==13) {
    		 $("#loginBut").click(); 
	    	 return false;                              
    	 }
    	}); 
    */
	//create by Liy at 2011-09-14
	document.onkeydown=function(e){
       var keyCode;
       /*ie support event&keyCode*/
        if (window.event){
        	keyCode=event.keyCode;
        }
        else{
        /*ff support e.which*/
       		keyCode=e.which;
        }
        if (keyCode==13){
        	document.getElementById("loginBut").click(); 
     	    return false;   
     	}
     }

    function doSubmit() {
    	var password=document.getElementById("password").value;
    	var b = new Base64();
		var str = b.encode(password);
    	document.getElementById("password").value=str;
        /* document.loginForm.loginID.value = document.loginForm.keyWord.value; */
		document.loginForm.submit();
		return true;
    }
    //加密方法
    function  encode(password){
    	var b = new Base64();
		var str = b.encode(password);
		return  str;
    }

    function bodyOnLoad() {
        var errors = document.getElementById('errors');
        if(errors) {
    		alert("请填写登录号和密码！");
        }
    }
    
    function controlPassword(){
    	if($('#password')[0].type=='text'){
    		$('#password')[0].type='password';
    	}else{
    		$('#password')[0].type='text';
    	}
    }
    
    if( !('placeholder' in document.createElement('input')) ){
        $('input[placeholder],textarea[placeholder]').each(function(){
            var that = $(this),
                    text= that.attr('placeholder');
            // console.log(text);
            if(that.val()===""){
                that.val(text).addClass('placeholder');
            }
            that.focus(function(){
                if(that.val()===text){
                    that.val("").removeClass('placeholder');
                }
            }).blur(function(){
                if(that.val()===""){
                    that.val(text).addClass('placeholder');
                }
            }).closest('form').submit(function(){
                if(that.val() === text){
                    that.val('');
                }
            });
        });
    }
  </script>
<%-- <%
  	  String isUserLogin = request.getParameter("isUserLogin") == null ? "true" : "false";
      String isPass = request.getParameter("validate");
      if("false".equals(isPass) && "false".equals(isUserLogin)){
%>
<script>
	alert("对不起，您没有访问权限");
</script>
<%
      } 
%> --%>
</head>
<body onload="bodyOnLoad();" style=" background-image:none;">
<form:form method="post" id="fm1" name="loginForm" action="module/LoginAuthentication/login.do">
	<form:errors path="*" id="errors" cssStyle="display: none;" />
	 <!--头部标题-->
    <div class="header w">西城区处级干部培训学时管理系统</div>
	<!--登录框-->
	    <div class="main">
			<div class="w">
				<div class="loginbox">
	                <div style="margin-left: 30px;margin-right: 30px;">
	                        <!--标题-->
	                    <div class="logo-tit"><a href="#">登录</a></div>
	                        <!--账号-->
	                    <div class="inputbox">
	                        <img src="<%=basePath%>skin/loginStyle/imgs/user.png"/>
	                        <span>账号</span>
							<input name="stamp" type="hidden" value="<%=System.currentTimeMillis()%>" /> 
		                    <input type="text"  name="loginID" id="loginID" placeholder="请输入登录号或手机号"/>
	                    </div>
	                        <!--密码-->
	                    <div class="inputbox" style="margin-top: 20px;">
	                        <img src="<%=basePath%>skin/loginStyle/imgs/password.png"/> 
	                        <span>密码</span>
	                        <input type="password"  name="password" id="password" placeholder=""/>
	                        <img onclick='controlPassword()' src="<%=basePath%>skin/loginStyle/imgs/keyword.png"/>
	                    </div>
	
	                        <!--文字-->
	                    <div class="inputtext">
	                        <div style="float: right;margin-right: 8px;">
	                        <c:if test=''${empty error}>
	                        	${error}
	                        </c:if>
	                        </div>
<!-- 	                        <div style="float: right;margin-right: 8px;">
	                            <a href="#">忘记密码?</a>
	                            <input type="checkbox" name="" value="" />记住密码
	                        </div> -->
	
	                    </div>
	
	                        <!--按钮-->
	                     <input type="submit" class="login" id="loginBut" onclick="doSubmit();" value="登&nbsp;&nbsp;&nbsp;录"/>
	                    <!-- <a href="#" class="login" onclick="doSubmit();">登&nbsp;&nbsp;&nbsp;录</a> -->
				        <%--  <div class="login_d"><a href="#" id="loginBut" onclick="doSubmit();" >登录</a></div>--%>
				          <input type="hidden" name="lt" value="${flowExecutionKey}" />
				          <input type="hidden" name="_eventId" value="submit" /> 
	                    <!--<input type="button" value="登&nbsp;&nbsp;&nbsp;录"  class="login"/>-->
	                </div>  
	            </div>
	           </div>
	          </div>
              <!--底部-->
    <div class="footer">
        <div class="w">
            <img src="<%=basePath%>skin/loginStyle/imgs/strat.png" style="float: left;margin-right: 40px;margin-top: 32px;"/>
            <span style="width:3px;height: 130px;background: #C3C3C3;
            display: block;float: left;margin-top: 20px;"></span>
            <ul>
                <li>分中心主办：中共北京市西城区委组织部</li>
                <li>电话：88064662（9:00-18:00）</li>
                <li>京ICP备05060934号</li>
            </ul>
        </div>
    </div>
	</form:form>
</body>
</html>
